import java.util.List;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 28318
 * Date: 2025-11-15
 * Time: 09:36
 */

public class Test {

    public static void main3(String[] args) {

    }

    public static void main(String[] args) {
        BinaryTree a = new BinaryTree();
        BinaryTree.TreeNodeInteger root = a.createTree1();
        System.out.println(a.preorderTraversal(root));
        System.out.println(a.inorderTraversal(root));
        System.out.println(a.postorderTraversal(root));
        BinaryTree.TreeNodeCharacter root1 = a.createTree();
        System.out.println(a.levelOrderList(root));
        System.out.println(a.levelOrderBottom(root));
    }

    public static void main1(String[] args) {
        BinaryTree test = new BinaryTree();
        BinaryTree.TreeNodeCharacter root = test.createTree();
        test.preOrder(root);
        System.out.println("");
        test.preOrder(test.invertTree(root));
        System.out.println("");
        BinaryTree.TreeNodeCharacter root1 = test.createTree();
        root1.right = null;
        System.out.println(test.isSameTree(root, root1));
    }

    public static void main0(String[] args) {
        BinaryTree test = new BinaryTree();
        BinaryTree.TreeNodeCharacter root = test.createTree();
        test.preOrder(root);
        System.out.println("");
        test.inOrder(root);
        System.out.println("");
        test.postOrder(root);
        System.out.println("");
        test.size(root);
        System.out.println(test.nodeSize);
        System.out.println(test.size2(root));
        test.getLeafNodeCount1(root);
        System.out.println(test.leafSize);
        System.out.println(test.getLeafNodeCount2(root));
        System.out.println(test.getKLevelNodeCount(root, 4));
        System.out.println(test.getHeight(root));
        System.out.println(test.find(root, 'G').val);
        test.levelOrder(root);
//        Stack sta = new Stack<>();
//        sta.push(null);
//        System.out.println(sta.peek());
        System.out.println(test.isCompleteTree(root));
    }
}
